package com.jwsoft.manager.core.gateway.controller.bigScreen;

import com.bifang.assistant.common.vo.BaseVO;
import com.bifang.engine.assistant.core.domain.AppResponse;
import com.bifang.engine.protect.core.annotation.NoSignCrypto;
import com.github.pagehelper.PageInfo;
import com.jwsoft.manager.common.vo.bigScreen.analysisXq.*;
import com.jwsoft.manager.core.integration.bigScreen.AnalysisXqIntegration;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/***
 *
 * **/
@RestController
@RequestMapping(value = "/doc/api")
@Tag(name = "大屏接口", description = "大屏接口")
public class AnalysisXqController {
    @Autowired
    public AnalysisXqIntegration analysisXqIntegration;

    @Operation(summary = "总览学校信息",description = "总览学校信息")
    @PostMapping(value = "/EduAnalysisXq0001", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<SchoolOverviewXqVO> getSchoolOverview(@RequestBody @Validated SchoolOverviewXqQueryVO vo) {
        return AppResponse.successData(analysisXqIntegration.getSchoolOverview(vo));
    }

    @Operation(summary = "总览地址信息",description = "总览地址信息")
    @PostMapping(value = "/EduAnalysisXq0002", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<AddressOverviewXqVO> getAddressOverview(@RequestBody @Validated AddressOverviewXqQueryVO vo) {
        return AppResponse.successData(analysisXqIntegration.getAddressOverview(vo));
    }

    @Operation(summary = "学校学区地图信息",description = "学校学区地图信息")
    @PostMapping(value = "/EduAnalysisXq0003", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<PageInfo<SchoolXqVO>> getSchoolXqList(@RequestBody @Validated SchoolXqQueryVO vo) {
        return AppResponse.successData(analysisXqIntegration.getSchoolXqList(vo));
    }

    @Operation(summary = "单个学校详细信息",description = "单个学校详细信息")
    @PostMapping(value = "/EduAnalysisXq0004", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<SchoolXqVO> getSchoolInfo(@RequestBody @Validated SchoolXqQueryVO vo) {
        return AppResponse.successData(analysisXqIntegration.getSchoolInfo(vo));
    }
    @Operation(summary = "学校学位排名分页查询",description = "学校学位排名分页查询")
    @PostMapping(value = "/EduAnalysisXq0005", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<List<SchoolXwpmVO>> getSchoolXwpm(@RequestBody @Validated SchoolXwpmQueryVO vo) {
        return AppResponse.successData(analysisXqIntegration.getSchoolXwpm(vo));
    }
    @Operation(summary = "区域学位排名分页查询",description = "区域学位排名分页查询")
    @PostMapping(value = "/EduAnalysisXq0006", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<List<AreaXwpmVO>> getAreaXwpm(@RequestBody @Validated AreaXwpmQueryVO vo) {
        return AppResponse.successData(analysisXqIntegration.getAreaXwpm(vo));
    }

    @Operation(summary = "总体人数查询",description = "总体人数查询")
    @PostMapping(value = "/EduAnalysisXq0007", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<HouseHoldRsVO> getHouseHoldRs(@RequestBody @Validated SchoolOverviewXqQueryVO vo) {
        return AppResponse.successData(analysisXqIntegration.getHouseHoldRs(vo));
    }

    @Operation(summary = "信息采集总览",description = "信息采集总览")
    @PostMapping(value = "/EduAnalysisXq0008", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<AcquOverviewVO> getAcquOverviewVO(@RequestBody @Validated HandConInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getAcquOverviewVO(vo));
    }

    @Operation(summary = "核实协统数据使用情况",description = "核实协统数据使用情况")
    @PostMapping(value = "/EduAnalysisXq0009", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<DyIndividuationVO> getDyIndividuationVO(@RequestBody @Validated HandConInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getDyIndividuationVO(vo));
    }
    @Operation(summary = "各类别报名预测情况",description = "各类别报名预测情况")
    @PostMapping(value = "/EduAnalysisXq0010", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<BeforVO> getBeforVO(@RequestBody @Validated HandConInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getBeforVO(vo));
    }

    @Operation(summary = "预报名排行指标生成",description = "预报名排行指标生成")
    @PostMapping(value = "/EduAnalysisXq0011", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<EnrolYbmVO> getEnrolYbm(@RequestBody @Validated HandConInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getEnrolYbm(vo));
    }

    @Operation(summary = "学校预报名信息生成批处理结束",description = "学校预报名信息生成批处理结束")
    @PostMapping(value = "/EduAnalysisXq0018", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse clearCacheCreate(@RequestBody BaseVO vo) {
        analysisXqIntegration.clearCacheCreate(vo);
        return AppResponse.success();
    }

    @Operation(summary = "学校预测预报名信息生成",description = "学校预测预报名信息生成")
    @PostMapping(value = "/EduAnalysisXq0017", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<EnrolYbmVO> getEnrolYbmCalculate(@RequestBody @Validated HandConInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getEnrolYbmCalculate(vo));
    }

    @Operation(summary = "区县预报名排行",description = "区县预报名排行")
    @PostMapping(value = "/EduAnalysisXq0012", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<List<EnrolYbmQxVO>> getEnrolYbmQx(@RequestBody @Validated HandConInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getEnrolYbmQx(vo));
    }
    @Operation(summary = "学校预报名信息",description = "学校预报名信息")
    @PostMapping(value = "/EduAnalysisXq0013", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<PageInfo<EnrolYbmXxVO>> getEnrolYbmXx(@RequestBody @Validated HandConInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getEnrolYbmXx(vo));
    }

    @Operation(summary = "预报名信息汇总",description = "预报名信息汇总")
    @PostMapping(value = "/EduAnalysisXq0014", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<HandConVO> getEnrolYbmHz(@RequestBody @Validated HandConInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getEnrolYbmHz(vo));
    }

    @Operation(summary = "预报名的信息列表",description = "预报名的信息列表")
    @PostMapping(value = "/EduAnalysisXq0019", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<PageInfo<EnrolYbmXxRyVO>> getEnrolYbmXxRy(@RequestBody @Validated EnrolYbmXxRyInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getEnrolYbmXxRy(vo));
    }

    @Operation(summary = "学生占比",description = "学生占比")
    @PostMapping(value = "/EduAnalysisXq0015", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<StuEnrollXszbVO> getStuEnrollXszb(@RequestBody @Validated StuEnrollInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollXszb(vo));
    }

    @Operation(summary = "实时报名汇总信息",description = "实时报名汇总信息")
    @PostMapping(value = "/EduAnalysisXq0016", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<StuEnrollHzxxVO> getStuEnrollHzxx(@RequestBody @Validated StuEnrollInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollHzxx(vo));
    }

    @Operation(summary = "报名人数",description = "报名人数")
    @PostMapping(value = "/EduAnalysisXq0020", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<StuEnrollBmrsVO> getStuEnrollBmrs(@RequestBody @Validated StuEnrollInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollBmrs(vo));
    }

    @Operation(summary = "乡镇街道排名",description = "乡镇街道排名")
    @PostMapping(value = "/EduAnalysisXq0021", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<List<StuEnrollXzjdpmVO>> getStuEnrollXzjdpm(@RequestBody @Validated StuEnrollInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollXzjdpm(vo));
    }

    @Operation(summary = "单个学校信息",description = "单个学校信息")
    @PostMapping(value = "/EduAnalysisXq0022", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<StuEnrollDgxxVO> getStuEnrollDgxx(@RequestBody @Validated StuEnrollDgxxInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollDgxx(vo));
    }

    @Operation(summary = "学校画像",description = "学校画像")
    @PostMapping(value = "/EduAnalysisXq0023", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<StuEnrollXxhxVO> getStuEnrollXxhx(@RequestBody @Validated StuEnrollDgxxInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollXxhx(vo));
    }

    @Operation(summary = "学位调剂人员生成",description = "学位调剂人员生成")
    @PostMapping(value = "/EduAnalysisXq0024", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<StuEnrollXxhxVO> getStuEnrollxstjsc(@RequestBody @Validated StuEnrollInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollxstjsc(vo));
    }

    @Operation(summary = "学位调剂",description = "学位调剂")
    @PostMapping(value = "/EduAnalysisXq0025", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<StuEnrollXwdtjReVO> getStuEnrollXwtj(@RequestBody @Validated StuEnrollXwdtjReInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollXwtj(vo));
    }

    @Operation(summary = "学校待调剂信息",description = "学校待调剂信息")
    @PostMapping(value = "/EduAnalysisXq0026", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<PageInfo<StuEnrollXxtjVO>> getStuEnrollXxdtjxx(@RequestBody @Validated StuEnrollXxtjxxInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollXxdtjxx(vo));
    }

    @Operation(summary = "学校调剂信息",description = "学校调剂信息")
    @PostMapping(value = "/EduAnalysisXq0027", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<PageInfo<StuEnrollXwtjReVO>> getStuEnrollXxtjxx(@RequestBody @Validated StuEnrollXxtjxxInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollXxtjxx(vo));
    }

    @Operation(summary = "学生画像",description = "学生画像")
    @PostMapping(value = "/EduAnalysisXq0028", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<StuXshxVO> getStuXshx(@RequestBody @Validated StuXshxInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuXshx(vo));
    }

    @Operation(summary = "5年趋势生成",description = "5年趋势生成")
    @PostMapping(value = "/EduAnalysisXq0029", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<FiveYearTrendVO> setFiveYearTrend(@RequestBody @Validated FiveYearTrendVO vo) {
        return AppResponse.successData(analysisXqIntegration.setFiveYearTrend(vo));
    }

    @Operation(summary = "学区内小区",description = "学区内小区")
    @PostMapping(value = "/EduAnalysisXq0030", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<PageInfo<StuEnrollXxhxXqnxqVO>> getStuEnrollXxhxXqnxq(@RequestBody @Validated StuEnrollDgxxInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollXxhxXqnxq(vo));
    }

    @Operation(summary = "报名学生明细",description = "报名学生明细")
    @PostMapping(value = "/EduAnalysisXq0031", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<PageInfo<StuEnrollBmmxVO>> getStuEnrollBmmx(@RequestBody @Validated StuEnrollDgxxInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuEnrollBmmx(vo));
    }

    @Operation(summary = "预采集人员户籍信息生成",description = "预采集人员户籍信息生成")
    @NoSignCrypto
    @PostMapping(value = "/EduAnalysisXq0032", produces = "application/json;charset=UTF-8")
    public  AppResponse<StuEnrollInVO> getStuHjxx(@RequestBody @Validated StuEnrollInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getStuHjxx(vo));
    }

    @Operation(summary = "学校人数统计表生成",description = "学校人数统计表生成")
    @PostMapping(value = "/EduAnalysisXq0033", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<StuRsVO> acqSchoolRs(@RequestBody @Validated StuRsVO vo) {
        return AppResponse.successData(analysisXqIntegration.acqSchoolRs(vo));
    }

    @Operation(summary = "学校人数统计",description = "学校人数统计")
    @PostMapping(value = "/EduAnalysisXq0034", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public   AppResponse<List<StuRsTjVo>> getSchoolRs(@RequestBody @Validated StuRsInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getSchoolRs(vo));
    }

    @Operation(summary = "根据经纬度取15km内学校人数统计",description = "根据经纬度取15km内学校人数统计")
    @PostMapping(value = "/EduAnalysisXq0035", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public   AppResponse<List<StuRsFromLatLngVO>> getSchoolRsFromLatLng(@RequestBody @Validated StuRsFromLatLngInVO vo) {
        return AppResponse.successData(analysisXqIntegration.getSchoolRsFromLatLng(vo));
    }

    @Operation(summary = "第一个屏指标数据生成",description = "第一个屏指标数据生成")
    @PostMapping(value = "/EduAnalysisXq0038", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public   AppResponse insertEduBigscreenZbtj(@RequestBody @Validated SchoolOverviewXqQueryVO vo) {
        analysisXqIntegration.insertEduBigscreenZbtj(vo);
        return AppResponse.successMsg("数据生成成功！");
    }


}
